# $Id$
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Alessio 'mOlOk' Bolognino <themolok@gmail.com>

pkgname=iasl
pkgver=20180105
pkgrel=1
pkgdesc="Intel ACPI Source Language compiler"
arch=('loong64' 'x86_64')
url="http://acpica.org"
license=('custom')
depends=('glibc')
makedepends=('flex' 'bison')
options=('!makeflags')
source=(https://acpica.org/sites/acpica/files/acpica-unix-${pkgver}.tar.gz
	LICENSE)
sha256sums=('414f843ac6c7c53bbd2a830b092a2a27c49172b0878fd27fe306dd526b78b921'
            'a8eeb8c94b709f91be8575c229cc1df7f8aacb018224b23b0ab6f833a7f18591')

build() {
  cd "${srcdir}/acpica-unix-${pkgver}"/generate/unix

  #sed -i -e 's/_CYGWIN/_LINUX/g' -e 's/-Werror//g' Makefile.config

  make clean
  make
}

package() {
  cd "${srcdir}/acpica-unix-${pkgver}"/generate/unix

  make DESTDIR=${pkgdir} install

  install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
